/******************************************************************************
** 
** File name: 	UTEST_CFG.h
**	
** Description:	RTOS Ver.3 Unit Tests Resource configuration file.
**
** -D$(Configuration)
**	|
**	+->	UTEST_CFG.h
**		|
**		+-> UTEST_RES.h
**		|	|
**		|	+-> UTEST_xx.c
**  	+-----> UTEST_RES.c
**
** RTOS API Services to be checked:
**
**		NONE 
**
** Notes:		Put RTOS resource configuration here. For RTOS Version 3.0 and
**				later. 
**
*******************************************************************************
**
** Change history:
**	
** 09/25/2012 -AK- 	Introducing new unit test standard with RTOS 
**					configuration moved to the dedicated source/header file
** 10/09/2012 -AK- 	Added few configuration possibilities for latest RTOS 
**					features (TMR, TMS)
** 10/10/2012 -AK-  Adding debug output configuration support
**
******************************************************************************/
#include "rtos.h"
#include "utest.h"

/*******************************************************************************
** Unit test debug log output config (common for all unit tests)
*******************************************************************************/
#define LOG_MAIN
#define LOG_TASK
#define LOG_ISR

#include "UTEST_LOG.h"

/*******************************************************************************
** UTEST_00 RTOS resource config (template)
*******************************************************************************/
#if defined( UTEST_00 )

/* 
** 	TIMERS
*/
#define SYS_TMR
#	define SYS_TMR_PERIOD		5000
#	define SYS_TMR_LEVEL		LEVEL_HIGH
#	define SYS_TMR_STATE		STATE_RUN
#define TIMER_1		
#	define TIMER_1_PERIOD		10000	
#	define TIMER_1_LEVEL		LEVEL_MED
#	define TIMER_1_STATE		STATE_RUN
#define	TIMER_2	
#	define TIMER_2_PERIOD		20000
#	define TIMER_2_LEVEL		LEVEL_LOW
#	define TIMER_2_STATE		STATE_RUN

/* 
**	TASKS
*/
#define	TSK0
#	define	TSK0_STK_SIZE	30
#	define	TSK0_PRIORITY	0
#	define 	TSK0_INITSTATE	SUSPENDED
#define	TSK1
#	define	TSK1_STK_SIZE	30
#	define	TSK1_PRIORITY	1
#	define 	TSK1_INITSTATE	RESUMED
#define	TSK2
#	define	TSK2_STK_SIZE	30	
#	define	TSK2_PRIORITY	2
#	define 	TSK2_INITSTATE	RESUMED
#define	TSK3
#	define	TSK3_STK_SIZE	30
#	define	TSK3_PRIORITY	3
#	define 	TSK3_INITSTATE	RESUMED

/* 
**	EVENTS
*/
#define EVT0
#define EVT1
#define EVT2
#define EVT3

/* 
**	MESSAGES
*/
#define MSG0
#define MSG1
#define MSG2
#define MSG3

/* 
**	QUEUES
*/
#define MSQ0
#define MSQ1
#define MSQ2
#define MSQ3

/*
** TIMERS
*/
#define TMR0
#define TMR1
#define TMR2
#define TMR3

#endif /* ifdef UTEST_00 */



/*******************************************************************************
** RTOS Resource Configuration for:
** UTEST_01 
*******************************************************************************/
#if defined( UTEST_01 )

/* 
** 	TIMER PERIPHERAL MODULES HARDWARE
*/

// N/A

/* 
**	TASKS
*/
#define	TSK0
#	define	TSK0_STK_SIZE	30
#	define	TSK0_PRIORITY	0
#	define 	TSK0_INITSTATE	SUSPENDED
#define	TSK1
#	define	TSK1_STK_SIZE	100
#	define	TSK1_PRIORITY	1
#	define 	TSK1_INITSTATE	RESUMED
#define	TSK2
#	define	TSK2_STK_SIZE	30	
#	define	TSK2_PRIORITY	2
#	define 	TSK2_INITSTATE	SUSPENDED
#define	TSK3
#	define	TSK3_STK_SIZE	30
#	define	TSK3_PRIORITY	3
#	define 	TSK3_INITSTATE	SUSPENDED

/* 
**	EVENTS
*/

// N/A

/* 
**	MESSAGES
*/

// N/A

/* 
**	QUEUES
*/

// N/A

/* 
**	TIMERS
*/

// N/A

#endif /* ifdef UTEST_01 */

/*******************************************************************************
** RTOS Resource Configuration for:
** UTEST_02 
*******************************************************************************/
#if defined( UTEST_02 )

/* 
** 	TIMER PERIPHERAL MODULES HARDWARE
*/

// N/A

/* 
**	TASKS
*/
#define	TSK0
#	define	TSK0_STK_SIZE	30
#	define	TSK0_PRIORITY	0
#	define 	TSK0_INITSTATE	SUSPENDED
#define	TSK1
#	define	TSK1_STK_SIZE	30
#	define	TSK1_PRIORITY	1
#	define 	TSK1_INITSTATE	RESUMED
#define	TSK2
#	define	TSK2_STK_SIZE	30	
#	define	TSK2_PRIORITY	2
#	define 	TSK2_INITSTATE	RESUMED
#define	TSK3
#	define	TSK3_STK_SIZE	30
#	define	TSK3_PRIORITY	3
#	define 	TSK3_INITSTATE	RESUMED

/* 
**	EVENTS
*/

// N/A

/* 
**	MESSAGES
*/

// N/A

/* 
**	QUEUES
*/

// N/A

/* 
**	TIMERS
*/

// N/A

#endif /* ifdef UTEST_02 */

/*******************************************************************************
** RTOS Resource Configuration for:
** UTEST_03
*******************************************************************************/
#if defined( UTEST_03 )

/* 
** 	TIMER PERIPHERAL MODULES HARDWARE
*/

// N/A

/* 
**	TASKS
*/
#define	TSK0
#	define	TSK0_STK_SIZE	30
#	define	TSK0_PRIORITY	0
#	define 	TSK0_INITSTATE	SUSPENDED
#define	TSK1
#	define	TSK1_STK_SIZE	30
#	define	TSK1_PRIORITY	1
#	define 	TSK1_INITSTATE	RESUMED
#define	TSK2
#	define	TSK2_STK_SIZE	30	
#	define	TSK2_PRIORITY	1
#	define 	TSK2_INITSTATE	RESUMED
#define	TSK3
#	define	TSK3_STK_SIZE	30
#	define	TSK3_PRIORITY	1
#	define 	TSK3_INITSTATE	RESUMED

/* 
**	EVENTS
*/

// N/A

/* 
**	MESSAGES
*/

// N/A

/* 
**	QUEUES
*/

// N/A

/* 
**	TIMERS
*/

// N/A

#endif /* ifdef UTEST_03 */

/*******************************************************************************
** RTOS Resource Configuration for:
** UTEST_04
*******************************************************************************/
#if defined( UTEST_04 )

/* 
** 	TIMER PERIPHERAL MODULES HARDWARE
*/

// N/A

/* 
**	TASKS
*/
#define	TSK0
#	define	TSK0_STK_SIZE	30
#	define	TSK0_PRIORITY	0
#	define 	TSK0_INITSTATE	RESUMED
#define	TSK1
#	define	TSK1_STK_SIZE	30
#	define	TSK1_PRIORITY	1
#	define 	TSK1_INITSTATE	POSTPONED
#define	TSK2
#	define	TSK2_STK_SIZE	30	
#	define	TSK2_PRIORITY	1
#	define 	TSK2_INITSTATE	POSTPONED
#define	TSK3
#	define	TSK3_STK_SIZE	30
#	define	TSK3_PRIORITY	1
#	define 	TSK3_INITSTATE	POSTPONED

/* 
**	EVENTS
*/

// N/A

/* 
**	MESSAGES
*/

// N/A

/* 
**	QUEUES
*/

// N/A

/* 
**	TIMERS
*/

// N/A

#endif /* ifdef UTEST_04 */






/*******************************************************************************
** RTOS Resource Configuration for:
** UTEST_14
*******************************************************************************/
#if defined( UTEST_14 )

/* 
** 	TIMER PERIPHERAL MODULES HARDWARE
*/

// Configure inside the Unit test source (see UTEST_14.c)

/* 
**	TASKS
*/
#define	TSK0
#	define	TSK0_STK_SIZE	30
#	define	TSK0_PRIORITY	0
#	define 	TSK0_INITSTATE	RESUMED
#define	TSK1
#	define	TSK1_STK_SIZE	30
#	define	TSK1_PRIORITY	1
#	define 	TSK1_INITSTATE	RESUMED
#define	TSK2
#	define	TSK2_STK_SIZE	30	
#	define	TSK2_PRIORITY	1
#	define 	TSK2_INITSTATE	RESUMED
#define	TSK3
#	define	TSK3_STK_SIZE	30
#	define	TSK3_PRIORITY	1
#	define 	TSK3_INITSTATE	RESUMED

#endif /* ifdef UTEST_14 */





/*******************************************************************************
** UTEST_50 RTOS resource config 
*******************************************************************************/
#if defined( UTEST_50 )

/* 
** 	TIMERS
*/
//#define SYS_TMR
//#	define SYS_TMR_PERIOD		5000
//#	define SYS_TMR_LEVEL		LEVEL_HIGH
//#	define SYS_TMR_STATE		STATE_STOP
#define TIMER_1		
#	define TIMER_1_PERIOD		10001	
#	define TIMER_1_LEVEL		LEVEL_LOW
#	define TIMER_1_STATE		STATE_RUN
#define	TIMER_2	
#	define TIMER_2_PERIOD		20000
#	define TIMER_2_LEVEL		LEVEL_MED
#	define TIMER_2_STATE		STATE_RUN

/* 
**	TASKS
*/
#define	TSK0
#	define	TSK0_STK_SIZE	30
#	define	TSK0_PRIORITY	0
#	define 	TSK0_INITSTATE	SUSPENDED
#define	TSK1
#	define	TSK1_STK_SIZE	30
#	define	TSK1_PRIORITY	1
#	define 	TSK1_INITSTATE	RESUMED
#define	TSK2
#	define	TSK2_STK_SIZE	30	
#	define	TSK2_PRIORITY	2
#	define 	TSK2_INITSTATE	RESUMED
#define	TSK3
#	define	TSK3_STK_SIZE	30
#	define	TSK3_PRIORITY	3
#	define 	TSK3_INITSTATE	RESUMED

/* 
**	EVENTS
*/
#define EVT0
#define EVT1
#define EVT2
#define EVT3

/* 
**	MESSAGES
*/
#define MSG0
#define MSG1
#define MSG2
#define MSG3

/* 
**	QUEUES
*/
#define MSQ0
#define MSQ1
#define MSQ2
#define MSQ3

#endif /* ifdef UTEST_50 */



/*******************************************************************************
** UTEST_52, UTEST_53, UTEST_54 RTOS resource config 
*******************************************************************************/
#if ( defined( UTEST_52 ) || defined( UTEST_53 ) || defined( UTEST_54 ) )

/* 
** 	TIMERS
*/
//#define SYS_TMR
//#	define SYS_TMR_PERIOD		5000
//#	define SYS_TMR_LEVEL		LEVEL_HIGH
//#	define SYS_TMR_STATE		STATE_STOP
#define TIMER_1		
#	define TIMER_1_PERIOD		10001	
#	define TIMER_1_LEVEL		LEVEL_LOW
#	define TIMER_1_STATE		STATE_RUN
#define	TIMER_2	
#	define TIMER_2_PERIOD		20000
#	define TIMER_2_LEVEL		LEVEL_MED
#	define TIMER_2_STATE		STATE_RUN

/* 
**	TASKS
*/
#define	TSK0
#	define	TSK0_STK_SIZE	30
#	define	TSK0_PRIORITY	0
#	define 	TSK0_INITSTATE	SUSPENDED
#define	TSK1
#	define	TSK1_STK_SIZE	30
#	define	TSK1_PRIORITY	1
#	define 	TSK1_INITSTATE	RESUMED
#define	TSK2
#	define	TSK2_STK_SIZE	30	
#	define	TSK2_PRIORITY	2
#	define 	TSK2_INITSTATE	RESUMED
#define	TSK3
#	define	TSK3_STK_SIZE	30
#	define	TSK3_PRIORITY	3
#	define 	TSK3_INITSTATE	RESUMED

/* 
**	EVENTS
*/
#define EVT0
#define EVT1
#define EVT2
#define EVT3

/* 
**	MESSAGES
*/
#define MSG0
#define MSG1
#define MSG2
#define MSG3

/* 
**	QUEUES
*/
#define MSQ0
#define MSQ1
#define MSQ2
#define MSQ3

#endif /* ifdef UTEST_52 || UTEST_53 || UTEST_54 */


/*******************************************************************************
** RTOS resource config for 
** UTEST_60, UTEST_61, UTEST_62, UTEST_63, UTEST_64, utest_65 
*******************************************************************************/
#if ( defined( UTEST_60 ) || defined( UTEST_61 ) || defined( UTEST_62 ) || \
	  defined( UTEST_63 ) || defined( UTEST_64 ) || defined( UTEST_65 ) )

/* 
** 	TIMERS
*/
#define SYS_TMR
#	define SYS_TMR_PERIOD		5000
#	define SYS_TMR_LEVEL		LEVEL_HIGH
#	define SYS_TMR_STATE		STATE_RUN
//#define TIMER_0
//#	define TIMER_1_PERIOD		10001	
//#	define TIMER_1_LEVEL		LEVEL_LOW
//#	define TIMER_1_STATE		STATE_STOP
#define TIMER_1		
#	define TIMER_1_PERIOD		20001
#	define TIMER_1_LEVEL		LEVEL_LOW
#	define TIMER_1_STATE		STATE_RUN
//#define	TIMER_2	
//#	define TIMER_2_PERIOD		20000
//#	define TIMER_2_LEVEL		LEVEL_MED
//#	define TIMER_2_STATE		STATE_RUN

/* 
**	TASKS
*/
#define	TSK0
#	define	TSK0_STK_SIZE	30
#	define	TSK0_PRIORITY	0
#	define 	TSK0_INITSTATE	SUSPENDED
#define	TSK1
#	define	TSK1_STK_SIZE	30
#	define	TSK1_PRIORITY	1
#	define 	TSK1_INITSTATE	RESUMED
#define	TSK2
#	define	TSK2_STK_SIZE	30	
#	define	TSK2_PRIORITY	2
#	define 	TSK2_INITSTATE	RESUMED
#define	TSK3
#	define	TSK3_STK_SIZE	30
#	define	TSK3_PRIORITY	3
#	define 	TSK3_INITSTATE	RESUMED

/* 
**	EVENTS
*/
#define EVT0
#define EVT1
#define EVT2
#define EVT3

/* 
**	MESSAGES
*/
#define MSG0
#define MSG1
#define MSG2
#define MSG3

/* 
**	QUEUES
*/
#define MSQ0
#define MSQ1
#define MSQ2
#define MSQ3

/*
** TIMERS
*/
#define TMR0
#define TMR1
#define TMR2
#define TMR3

#endif /* ifdef UTEST_60 || UTEST_61 || UTEST_62 || UTEST_63 || UTEST_64 || UTEST_65 */




/*******************************************************************************
** RTOS resource config for 
** UTEST_70, UTEST_71
*******************************************************************************/
#if ( defined( UTEST_70 ) || defined(UTEST_71) )

/* 
** 	TIMERS
*/
#define SYS_TMR
#	define SYS_TMR_PERIOD		5000
#	define SYS_TMR_LEVEL		LEVEL_HIGH
#	define SYS_TMR_STATE		STATE_RUN
//#define TIMER_0
//#	define TIMER_1_PERIOD		10001	
//#	define TIMER_1_LEVEL		LEVEL_LOW
//#	define TIMER_1_STATE		STATE_STOP
//#define TIMER_1		
//#	define TIMER_1_PERIOD		20001
//#	define TIMER_1_LEVEL		LEVEL_LOW
//#	define TIMER_1_STATE		STATE_RUN
//#define	TIMER_2	
//#	define TIMER_2_PERIOD		20000
//#	define TIMER_2_LEVEL		LEVEL_MED
//#	define TIMER_2_STATE		STATE_RUN

/* 
**	TASKS
*/
#define	TSK0
#	define	TSK0_STK_SIZE	30
#	define	TSK0_PRIORITY	0
#	define 	TSK0_INITSTATE	SUSPENDED
#define	TSK1
#	define	TSK1_STK_SIZE	30
#	define	TSK1_PRIORITY	1
#	define 	TSK1_INITSTATE	RESUMED
#define	TSK2
#	define	TSK2_STK_SIZE	30	
#	define	TSK2_PRIORITY	2
#	define 	TSK2_INITSTATE	RESUMED
#define	TSK3
#	define	TSK3_STK_SIZE	30
#	define	TSK3_PRIORITY	3
#	define 	TSK3_INITSTATE	RESUMED

/* 
**	EVENTS
*/
#define EVT0
#define EVT1
#define EVT2
#define EVT3

/* 
**	MESSAGES
*/
#define MSG0
#define MSG1
#define MSG2
#define MSG3

/* 
**	QUEUES
*/
#define MSQ0
#define MSQ1
#define MSQ2
#define MSQ3

/*
** TIMERS
*/
#define TMR0
#define TMR1
#define TMR2
#define TMR3

/*
** TIMER MESSAGES
*/
#define TMS0
#define TMS1
#define TMS2
#define TMS3

#endif /* ifdef UTEST_70 || UTEST_71 */
